<?php
# Calendar v1.0
# Copyright (c) 2016 Victor Nabatov greenray.spb@gmail.com
# Template for calendar

die();?>

<!DOCTYPE html>
<html lang="$locale">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Calendar</title>
    <style type="text/css">
    <!--
        body {background:#fff;color:black;font:normal 14px arial,verdana,sans-serif;margin:0;padding:0}
        input[type="submit"] {background:#bbb;border: 1px solid #555;border-radius:6px;min-width:110px;padding:2px 0}
        input[type="submit"]:hover {background:lightgray;color:red}
        select {border-radius:4px;font-size:14px;margin:1px 0;padding:2px 5px;width:160px}
        select:focus {outline:1px solid red}
        table {border:2px groove #fff;padding:10px}
        option {padding:0 5px}
        p {margin:10px 0}
        .calendar {margin:50px auto;width:300px}
        .calendar th {background:#1a4b4e;color:#fff;padding:2px}
        .calendar td {padding:2px; text-align:center}
        .calendar form input {margin:5px 0 0}
        .special {color:red}
    -->
    </style>
</head>
<body>
    <div>
    <table class="calendar center">
        <tr><th colspan="7">$month</th></tr>
        <tr>$header</tr>
        <!-- FOREACH $calendar -->
            <tr>
            <!-- IF !empty($calendar.span) -->
                <td colspan="$calendar.span">&nbsp;</td>
            <!-- END -->
            <!-- FOREACH $calendar.dates -->
                <td class="$dates.class center">
                <!-- IF !empty($dates.events) -->
                    <a href="#" onclick="alert('You have chose $dates.events');">
                <!-- END -->
                        $dates.date
                <!-- IF !empty($dates.events) -->
                    </a>
                <!-- END -->
                </td>
            <!-- END -->
            </tr>
        <!-- END -->
        <tr>
            <td colspan="7">
                <form name="calendar" class="center" method="post" >
                    <p>
                        <select name="month">
                        <!-- FOREACH $months -->
                            <option value="$months.num" <!-- IF !empty($months.selected) -->selected<!-- END -->>$months.name</option>
                        <!-- END -->
                        </select>
                        <select name="year">
                        <!-- FOREACH $years -->
                            <option value="$years.year" <!-- IF !empty($years.selected) -->selected<!-- END -->>$years.year</option>
                        <!-- END -->
                        </select>
                    </p>
                    <p><input type="submit" value="OK" /></p>
                </form>
            </td>
        </tr>
    </table>
</div>
</body>
</html>
